import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
	{
		path: '/',
		redirect: "/login"
	},
	{
		path: '/login',
		name: "login",
		component: () => import("@/views/login/index.vue")
	},
	{
		path: '/menu',
		name: "menu",
		component: () => import("@/views/menu/index.vue"),
		children: [
			{
				path: '/home',
				name: "home",
				component: () => import("@/views/home/index.vue")
			},
			{
				path: '/set',
				name: "set",
				component: () => import("@/views/set/index.vue")
			},
			{
				path: '/overview',
				name: "overview",
				component: () => import("@/views/overview/index.vue")
			},
			{
				path: '/product_manage',
				name: "product_manage",
				component: () => import("@/views/user_manage/product_manage/index.vue")
			},
			{
				path: '/users_manage',
				name: "users_manage",
				component: () => import("@/views/user_manage/users_manage/index.vue")
			},
			{
				path: '/user_list',
				name: "user_list",
				component: () => import("@/views/user_manage/user_list/index.vue")
			},
			{
				path: '/message_manage',
				name: "message_manage",
				component: () => import("@/views/user_manage/message_manage/index.vue")
			}
		]
	}
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
